]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowManager: Use sourceRect for consistency
authorAlessandro Bono <abono@gnome.org>
Sat, 20 May 2017 15:04:08 +0000 (17:04 +0200)
committerAlessandro Bono <abono@gnome.org>
Wed, 24 May 2017 19:10:28 +0000 (21:10 +0200)
Now that we always pass the old frame rect, we can use that
instead of picking up the dimensions of the clone actor.

https://bugzilla.gnome.org/show_bug.cgi?id=766685

js/ui/windowManager.js

index 8b5c461180b0ec8877975b005d24e5a596162257..b1a3563ee1d9b487b86961c4d6a2f0dcef431882 100644 (file)
@@ -1346,9 +1346,10 @@ const WindowManager = new Lang.Class({
 
         let actorClone = actor.__fullscreenInfo.clone;
         let targetRect = actor.meta_window.get_frame_rect();
+        let sourceRect = actor.__fullscreenInfo.oldRect;
 
-        let scaleX = targetRect.width / actorClone.width;
-        let scaleY = targetRect.height / actorClone.height;
+        let scaleX = targetRect.width / sourceRect.width;
+        let scaleY = targetRect.height / sourceRect.height;
 
         this._resizing.push(actor);
 
@@ -1363,7 +1364,6 @@ const WindowManager = new Lang.Class({
                            transition: 'easeOutQuad'
                          });
 
-        let sourceRect = actor.__fullscreenInfo.oldRect;
         actor.translation_x = -targetRect.x + sourceRect.x;
         actor.translation_y = -targetRect.y + sourceRect.y;